﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using CoreLims.Models.CoreLims;
using IronPython.Hosting;
using Microsoft.EntityFrameworkCore;
using Microsoft.Scripting.Hosting;
using Newtonsoft.Json;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var workFlow = WorkFlow.CreateWorkFlow()  // 开始-采样-接收-结果录入-同级审核-QA审核-经理审核
                .NewDefinition("三级审核", "三级审核流程", "1", "审核")
                .AddStepStart()
                .AddSingleStep("一级审核", "")
                .AddSingleStep("二级审核", "")
                .AddSingleStep("三级审核", "")
                .AddStepEnd();

            workFlow.SaveDefinitionChanges();
        }
    }
}

// 主流程定义
//var workFlow = WorkFlow.CreateWorkFlow()  // 开始-采样-接收-结果录入-同级审核-QA审核-经理审核
//    .NewDefinition("检测主流程", "包含7个步骤，默认检测流程", "1", "检测")
//    .AddStepStart()
//    .AddSingleStep("采样", "")
//    .AddSingleStep("接收", "")
//    .AddSingleStep("结果录入", "")
//    .AddSingleStep("同级审核", "")
//    .AddSingleStep("QA审核", "")
//    .AddSingleStep("经理审核", "")
//    .AddStepEnd();

//workFlow.SaveDefinitionChanges();

//**********************************************************
//string connect = "Server=LocalHost;Database=CoreLims;MultipleActiveResultSets=True;Integrated Security=False;uid='sa';pwd='123qwe!@#';Trust Server Certificate=true;Connect Timeout=30";
//var dbContext = new CoreLimsContext(connect);
//string ids = "65bba67c-5883-466b-906f-31f096fc5e81";
//var st = SAMPLE.Sample.CreateSamplingLab(dbContext, ids, "采样标签.docx");
//Console.WriteLine(st);

//Console.WriteLine("运行结束，按任意键退出。");
